<?php 
$Content = QContext::instance();
$base_url = $Content->requestUDI();
$search = $base_url;
$search['action'] = 'search';
$hangup = $base_url;
$hangup['action'] = 'hangup';

?>
<form id="pagerForm" method="get" action="<?php echo url($base_url,null,null,array('mode'=>'standard'));?>">
		<input type="hidden" name="pageNum" value="<?php echo $pagination['current'];?>" /> <!--【必须】value=1可以写死-->
		<input type="hidden" name="numPerPage" value="<?php echo $pagination['page_size'];?>" /> <!--【可选】每页显示多少条-->
		<input type="hidden" name="orderField" value="<?php echo $orderField;?>" />
		<input type="hidden" name="orderDirection" value="<?php echo $orderDirection;?>" />
</form>


<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			
		
			
		</ul>
	</div>
	<table class="table" width="1200" layoutH="138">
		<thead>
			<tr>
				<th width="10%"  >代理</th>
				<th width="10%" >帐号 </th>
				<th width="15%" >IP地址</th>
				<th width="10%" >端口</th>
				<th width="15%" >注册时间</th>
				<th width="10%" >NAT</th>
				<th width="10%" >useragent</th>
				
				
				
			</tr>
		</thead>
		<tbody>
		
			<?php foreach ($item as $k=>$v):?>
			<?php if(!$v->ipaddr){continue;}?>
			<tr target="id" rel="<?php echo $v->id?>">
				<td><?php echo $v->agent->acctname?></td>
				<td><?php 
				echo $v->name;
				?></td>
				<td align="center"><?php echo $v->ipaddr;?> </td>
				<td><?php echo $v->port;?></td>
				<td><?php echo date('Y-m-d H:i:s',$v->createtime)?></td>
				<td><?php echo $v->nat;?></td>
				<td><?php echo $v->useragent;?></td>
			
			</tr>
			<?php endforeach;?>
		</tbody>
	</table>
	<div class="panelBar">
			<div class="pages">
			<span>显示</span>
			<select name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
				<option value="20" <?php if(isset($param['numPerPage'])&&$param['numPerPage']==20)echo 'selected=selected';?>>20</option>
				<option value="50" <?php if(isset($param['numPerPage'])&&$param['numPerPage']==50)echo 'selected=selected';?>>50</option>
				<option value="100" <?php if(isset($param['numPerPage'])&&$param['numPerPage']==100)echo 'selected=selected';?>>100</option>
				<option value="200" <?php if(isset($param['numPerPage'])&&$param['numPerPage']==200)echo 'selected=selected';?>>200</option>
			</select>
				<span>共 <?php echo $pagination['record_count'];?> 条</span>
			</div>
		
		<div class="pagination" targetType="navTab" totalCount="<?php echo $pagination['record_count'];?>" numPerPage="<?php echo $pagination['page_size'];?>" pageNumShown="10" currentPage="<?php echo $pagination['current'];?>" ></div>

	</div>
</div>